#ifndef QCOMBOBOXMODEL_H
#define QCOMBOBOXMODEL_H

#include <QAbstractListModel>

class QComboBoxModel : public QAbstractListModel
{
public:
    explicit QComboBoxModel(QObject *parent = nullptr);
    int rowCount(const QModelIndex &) const;
    QVariant data(const QModelIndex &index, int role) const;
    void populate(QList<QPair<int,QString>> *newValues);
    void deleteRow(int idx);
    void clear();

private:
    QList<QPair<int,QString>> *values;
};



#endif // QCOMBOBOXMODEL_H
